<template>
  <div>
    <div class="mtitle">
      <p @click="back" class="left">取消</p>
      <p class="mtitle-t">修改昵称</p>
      <p class="mright" @click="success">完成</p>
    </div>
    <input type="mtext" v-model="name" />
    <p class="mtxt">首次修改昵称免费哦</p>
  </div>
</template>

<script>
import { mapActions } from "vuex";
export default {
  data() {
    return {
      name: "",
    };
  },
  computed: {},
  methods: {
    ...mapActions("li", ["upProfile"]),

    //按钮
    radioCheck(index) {
      this.radio = index;
    },
    //取消
    back() {
      this.$router.back();
    },
    //成功
    success() {
      this.upProfile({ name: this.name });
    },
  },
};
</script>

<style lang="scss" scoped>
input {
  width: 628px;
  height: 60px;
  display: block;
  margin: 0 auto;
  background-color: rgba(239, 239, 239, 100);
  color: rgba(136, 136, 136, 100);
  font-size: 28px;
  font-family: Microsoft Yahei;
  border: 2px solid rgba(187, 187, 187, 100);
}
p {
  font-size: 28px;
  font-weight: bold;
  margin-left: 60px;
}
.mtitle {
  display: flex;
  align-items: center;
  text-align: center;
  .mleft {
    font-size: 28px;
    margin-left: 60px;
  }
  .mright {
    font-size: 28px;
    margin-right: 60px;
  }
  .mtitle-t {
    flex: 1;
    margin: 24px 0 40px 0;
    font-size: 40px;
    font-weight: bold;
  }
}
.mtxt {
  margin-top: 48px;
}
</style>